package data.dao;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.http.HttpSession;

import data.dao.daoImplementation.NotFoundException;
import data.dto.*;
import data.searchdto.LeaveSearchDTO;

public interface LeaveDAO {
	public ArrayList<LeaveDTO> findLeave(LeaveDTO leave)
			throws LeaveDAOException, SQLException;

	public ArrayList<LeaveDTO> findAllLeave() throws LeaveDAOException,
			SQLException;

	public void updateLeaveDetail(LeaveDTO LeaveDetail)
			throws LeaveDAOException, SQLException, NotFoundException;

	public void deleteLeaveDetail(LeaveDTO LeaveDetail)
			throws LeaveDAOException, SQLException, NotFoundException;

	ArrayList<LeaveDTO> findLeavebyUser(int userid) throws LeaveDAOException,
			SQLException;

	ArrayList<LeaveDTO> findLeavebyUsers(short status,
			ArrayList<UserHierarchyDetailDTO> userids)
			throws LeaveDAOException, SQLException;

	ArrayList<LeaveDTO> findLeave(LeaveSearchDTO leaveSearchdto)
			throws LeaveDAOException, SQLException;

	void updateLeaveDetail(short status, int id) throws LeaveDAOException,
			SQLException, NotFoundException;

	void insertLeaveDetail(LeaveDTO LeaveDetail, HttpSession session)
			throws LeaveDAOException, SQLException;

	float findremainingleave(int createdby, int leavetype, int usertype,
			String sql) throws SQLException;
}
